<html>
<!-- <body>
<style>
body {
	margin-top: 20px;
}
</style> -->
<style>
table {
    font-family: verdana, arial, sans-serif;
    font-size: 14px;
    color: #45678;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
}
table th {
    border-width: 1px;
    padding: 0px;
    border-style: solid;
    border-color: #666666;
    background-color: #dedede;
}
table td {
    border-width: 1px;
    padding: 0px;
    border-style: solid;
    border-color: #666666;
    background-color: #ffffff;
    text-align: right;
}
ul {
    list-style-type: none;
}
</style>
<div ng-app="myApp" ng-controller="ListCustCtrl">

<h2>Add New Order</h2>
 <form novalidate name="AddNewForm" id="add-new-form" method="post" action="">
 
   <table>
    <tr>
	<td>Order Date:  </td><td><input type="date" placeholder="dd-MM-yyyy" name="orderdate"  ng-model="order.orderdate" ></td>
    <td>Ref Number: </td><td><input type="text" name="refnumber" size="40" ng-model="order.refnumber"> </td>
    <td>Customer Name: </td><td><input type="text" ng-model="order.customername" capitalize></td>
    </tr>
    
    <tr>
      <td>Contact number: </td><td><input type="text" name="contactnumber" ng-model="order.contactnumber" > </td>
      <td>Delivery Date: </td><td><input type="date" name="deliverydate" ng-model="order.deliverydate"> </td>
      <td>Sold By: </td><td><input type="text" name="soldby" ng-model="order.soldby" capitalize></td>
    </tr>
    <tr>
	    <td>Delivered By: </td><td><input type="text" name="deliveredby"  ng-model="order.deliveredby" capitalize></td>
        <td>Glass From: </td><td><input type="text" name="glassfrom" ng-model="order.glassfrom"></td>
   </tr>
   </table>
   <hr>
   <table>
	<tr>
	   <td>Desc 1: </td><td><input type="text" name = "desc1" ng-model="order.desc1"capitalize></td>
       <td>Qty: </td><td><input type="number" size="15" name = "qty1" ng-model="order.qty1"></td>
	   <td>Price: </td><td><input type="number" size="15" name = "price1" ng-model="order.price1"></td>
       <!--<td>Amt value: </td><td><input type="text" name = "amtval1" ng-model="order.amtval"></td> -->
	   <td>Amt value:<label>{{order.qty1*order.price1}} </label> </td>   
	 </tr>
	
	<tr>
	 <td>Desc 2: </td><td><input type="text" name = "desc2" ng-model="order.desc2"capitalize></td>
        <td>Qty: </td><td><input type="number" size="15" name = "qty2" ng-model="order.qty2"></td>
		<td>Price: </td><td><input type="number" size="15" name = "price2" ng-model="order.price2"></td>
        <!--<td>Amt value: </td><td><input type="text" name = "amtval2" ng-model="order.amtval"></td> -->
		<td>Amt value:<label>{{order.qty2*order.price2}} </label> </td>
	</tr>
	<tr>
		<td>Desc 3: </td><td><input type="text" name = "desc3" ng-model="order.desc3"capitalize></td>
        <td>Qty: </td><td><input type="number" size="15" name = "qty3" ng-model="order.qty3"></td>
		<td>Price: </td><td><input type="number" size="15" name = "price3" ng-model="order.price3"></td>
       <!-- <td>Amt value: </td><td><input type="text" name = "amtval3" ng-model="order.amtval"></td> -->
		<td>Amt value: <label>  {{order.qty3*order.price3}} </label> </td>   
     </tr>
	</table>
	<table>
	<tr>
	   <td>RE: </td><td> </td>
       <td>ADD: </td><td><input type="number" size="5" name = "qty1" ng-model="order.addre" required></td>
	   <td>LE: </td><td> </td>
       <td>ADD: </td><td><input type="number" size="5" name = "qty1" ng-model="order.addle" required></td>
	</tr>
	
	<tr>
	    <td>SPH </td>
        <td>CYCL</td>
		<td>AXIS </td>
        <td>VA</td>
		<td>SPH </td>
        <td>CYCL</td>
		<td>AXIS </td>
        <td>VA</td>
	</tr>
	</table>
	<table>
	<tr>
	    <td><input type="number" name = "resph1"  ng-model="order.resph1" required> </td>
        <td><input type="number" name = "recycl1"  ng-model="order.recycl1" required></td>
		<td><input type="number" name = "reaxis1" ng-model="order.reaxis1" required> </td>
        <td><input type="text" name = "reva1"  ng-model="order.reva1" required></td>
		<td><input type="number" name = "lesph1"  ng-model="order.lesph1" required> </td>
        <td><input type="number" name = "lecycl1"  ng-model="order.lecycl1" required></td>
		<td><input type="number" name = "leaxis1" ng-model="order.leaxis1" required> </td>
        <td><input type="text" name = "leva1"  ng-model="order.leva1" required></td>
		
	</tr>
	<tr>
		<td> +{{order.resph1+order.addre}}</td>
        <td> {{order.recycl1}} </td>
		<td> {{order.reaxis1}} </td>
        <td> N/6</td>
		
		<td> +{{order.lesph1+order.addle}}</td>
        <td> {{order.lecycl1}}</td>
		<td> {{order.leaxis1}} </td>
		<td> N/6 </td>
	</tr>
	</table>
	<table>
	<tr>
		<td>Note: </td><td><textarea rows = "2" name="note" ng-model="order.note"capitalize></textarea></td>
        <td>Remarks:</td><td><textarea rows = "3" name="remarks" ng-model="order.remarks" capitalize></textarea></td>
    </tr>

	<tr>
		<td><b>Grand Total Rs: <b> <label>{{order.qty1*order.price1+order.qty2*order.price2+order.qty3*order.price3}} </label> </td>
		     
		<td>Advance Received: <input type="number" name = "advreceived" ng-model="order.advreceived"></td>
		<td>Balance: <label>{{order.qty1*order.price1+order.qty2*order.price2+order.qty3*order.price3-order.advreceived}} </label> </td>     
	</tr>
  
  <!--
  
  <div class="container">
	<div class="row">
		<div class="col-xs-8">
			<div class="panel panel-info">
				<div class="panel-heading">
					<div class="panel-title">
						<div class="row">
							<div class="col-xs-6">
								<h5><span class="glyphicon glyphicon-shopping-cart"></span> Shopping Cart</h5>
							</div>
							<div class="col-xs-6">
								<button type="button" class="btn btn-primary btn-sm btn-block">
									<span class="glyphicon glyphicon-share-alt"></span> Continue shopping
								</button>
							</div>
						</div>
					</div>
				</div>
				<div class="panel-body">
					<div class="row">
						<div class="col-xs-2"><img class="img-responsive" src="http://placehold.it/100x70">
						</div>
						<div class="col-xs-4">
							<h4 class="product-name"><strong>Product name</strong></h4><h4><small>Product description</small></h4>
						</div>
						<div class="col-xs-6">
							<div class="col-xs-6 text-right">
								<h6><strong>25.00 <span class="text-muted">x</span></strong></h6>
							</div>
							<div class="col-xs-4">
								<input type="text" class="form-control input-sm" value="1">
							</div>
							<div class="col-xs-2">
								<button type="button" class="btn btn-link btn-xs">
									<span class="glyphicon glyphicon-trash"> </span>
								</button>
							</div>
						</div>
					</div>
					<hr>
					<div class="row">
						<div class="col-xs-2"><img class="img-responsive" src="http://placehold.it/100x70">
						</div>
						<div class="col-xs-4">
							<h4 class="product-name"><strong>Product name</strong></h4><h4><small>Product description</small></h4>
						</div>
						<div class="col-xs-6">
							<div class="col-xs-6 text-right">
								<h6><strong>25.00 <span class="text-muted">x</span></strong></h6>
							</div>
							<div class="col-xs-4">
								<input type="text" class="form-control input-sm" value="1">
							</div>
							<div class="col-xs-2">
								<button type="button" class="btn btn-link btn-xs">
									<span class="glyphicon glyphicon-trash"> </span>
								</button>
							</div>
						</div>
					</div>
					<hr>
					<div class="row">
						<div class="text-center">
							<div class="col-xs-9">
								<h6 class="text-right">Added items?</h6>
							</div>
							<div class="col-xs-3">
								<button type="button" class="btn btn-default btn-sm btn-block">
									Update cart
								</button>
							</div>
						</div>
					</div>
				</div>
				<div class="panel-footer">
					<div class="row text-center">
						<div class="col-xs-9">
							<h4 class="text-right">Total <strong>$50.00</strong></h4>
						</div>
						<div class="col-xs-3">
							<button type="button" class="btn btn-success btn-block">
								Checkout
							</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
-->
        <button class="btn btn-primary" ng-disabled="AddNewForm.$invalid || isUnchanged(order)" id="add-new-btn" ng-click="add_new(order)">Save!</button>
        <a href="#/editorder/" class="btn">Cancel</a>
    </div>
	
	</html>